<?php

namespace App\Transformers\User;

use App\Models\UserNoticeSee;
use League\Fractal\TransformerAbstract;

class UserNoticeSeesTransformer extends TransformerAbstract
{
    public function transform(UserNoticeSee $userNoticeSee)
    {
        return [
            'id' => $userNoticeSee->id,
            'notice_id'=>$userNoticeSee->notice_id ?? '',
            'user_id'=>$userNoticeSee->user_id ?? '',
            'created_at' => $userNoticeSee->created_at ? $userNoticeSee->created_at->format("Y-m-d H:i:s") : '',
            'updated_at' => $userNoticeSee->updated_at ? $userNoticeSee->updated_at->format("Y-m-d H:i:s") : '',
        ];
    }
}
